package org.example.demo11_factory.two;

public class OperationFactory {
    public static Operation createOperation(String operationType) {
        if ("add".equalsIgnoreCase(operationType)) {
            return new AddOperation();
        } else if ("subtract".equalsIgnoreCase(operationType)) {
            return new SubtractOperation();
        }
        return null;
    }
}